home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / network / netcall.zip / NETCALL.DOC < prev    next >
Text File  |  1989-10-08  |  11KB  |  252 lines

  1.  
  2.                               
  3.                               NETCALL.TPU
  4.                                  v1.0
  5.  
  6.                           (c)1989 Duane Davis
  7.  
  8. What is NETCALL?
  9.  
  10.      NETCAL.TPU is a Turbo Pascal 4.0 unit that simplifies adding LANtastic
  11.   Netbios functions to your programs. This version includes all calls needed
  12.   to determine the Lantastic version, list logins/redirections, perform
  13.   login/logout/redirect, and expand error messages into meaningfull text.
  14.   Future versions may also include printer queue and copy support depending
  15.   on how many people express interest in it.
  16.  
  17. Disclaimer
  18.  
  19.      Although I have spent many hours debugging NETCALL.TPU, and it works
  20.   fine on my system, I cannot guarentee it to work for you and will not be
  21.   help liable for any damages it may cause.
  22.  
  23. Shareware Notice
  24.  
  25.      This program has been distributed under the shareware concept. As such
  26.   you are free to make copies, upload it to BBS', etc. as long as all files
  27.   are distributed with it and without modification. If you do decide to use
  28.   it in one of your programs I ask that you register it by sending $5 to:
  29.  
  30.                              Duane Davis
  31.                        4718 Meridian Ave. #376
  32.                          San Jose, CA 95118
  33.  
  34. Questions, Comments, Suggestions
  35.  
  36.      Any questions, comments or suggestions can be addressed to me either
  37.   by mail, through E-mail on EXEC-PC BBS, or as a comment to sysop on my BBS
  38.   at (408)287-2353.
  39.  
  40.  
  41. Using NETCALL.TPU
  42.  
  43.      NETCALL.TPU must be compiled into your source code in order to use it. 
  44.   All you have to do is add the line "USES NETCALLx" (x = 4 or 5 depending
  45.   on which version of Pascal you are using) following the program name
  46.   declaration. Calling the routines work as if they were an actual procedure/
  47.   function in your code.
  48.  
  49.      Variables marked with a * are supplied by you. All other variables are
  50.   returned by the called routine.
  51.  
  52. -----------------------------------------------------------------------------
  53.   Function Version : String;
  54.  
  55.      Returns the network softwares major and minor version numbers in a
  56.      string. ie. "2.42".
  57. -----------------------------------------------------------------------------
  58.   Function GetError (ErrorNum: Integer) : String;
  59.  
  60.      ErrorNum = Error number to be converted.
  61.  
  62.      Takes an error number and expands it into a text string. See error
  63.      chart listed elsewhere in this file for a list of error numbers and
  64.      text strings. Any error number out of the range of the ones listed
  65.      in the chart will return "Undefined error number".
  66. -----------------------------------------------------------------------------
  67.   Procedure GetDevice( Index  : Integer;
  68.                    Var Name   : String;
  69.                    Var Path   : String;
  70.                    Var Type   : Integer;
  71.                    Var Status : Integer;
  72.                    Var Error  : Integer);
  73.  
  74.    * Index  = Redirection entry index. Index 0 specifies the first entry.
  75.      Name   = Device name (ie. "C:")
  76.      Path   = Path that device is redirected to (ie. "\\SERVER\DRIVE_C")
  77.      Type   = Type of Device (3=Printer, 4=Disk)
  78.      Status = Status of redirection (0=Valid, 1=Invalid)
  79.      Error  = Error number or 0 if no error
  80.  
  81.      Returns information on a redirected device. Error = 18 when Index is
  82.      higher than last entry.
  83. -----------------------------------------------------------------------------
  84.   Procedure NetUse(    Name   : String;
  85.                        Path   : String;
  86.                        Type   : Integer;
  87.                    Var Error  : Integer);
  88.  
  89.    * Name   = Name of device to be redirected (ie. "C:")
  90.    * Path   = Path to redirect to (ie. "\\SERVER\DRIVE_C")
  91.    * Type   = Type of Device (3=Printer, 4=Disk)
  92.      Error  = Error number or 0 if no error
  93.  
  94.      Creates a device redirection. Does the same thing as
  95.      NET USE {Local Drive|Printer} {\\ServerName\Network resource}
  96. -----------------------------------------------------------------------------
  97.   Procedure NetUnuse(  Name   : String;
  98.                    Var Error  : Integer);
  99.  
  100.    * Name   = Name of redirection to cancel (ie. "C:")
  101.      Error  = Error number or 0 if no error
  102.  
  103.      Cancel a device redirection. Does the same thing as
  104.      NET UNUSE {Local Drive|Printer}
  105. -----------------------------------------------------------------------------
  106.   Procedure GetLogins( Index  : Integer;
  107.                    Var Name   : String;
  108.                    Var Error  : Integer);
  109.  
  110.    * Index  = Login entry index. Index 0 specifies the first entry.
  111.      Name   = Computer name logged into
  112.      Error  = Error number or 0 if no error
  113.  
  114.      Get name of servers you are currently logged into. 
  115. -----------------------------------------------------------------------------
  116.   Procedure NetLogin( Server  : String;
  117.                       Name    : String;
  118.                       Paswrd  : String;
  119.                   Var Error   : Integer);
  120.  
  121.    * Server = Name of server to log into (ie. "\\SERVER")
  122.    * Name   = Account name to log into (ie. "Manager)
  123.    * Paswrd = Account password
  124.      Error  = Error number or 0 if no error
  125.  
  126.      Log into an available server. Does the same thing as
  127.      NET LOGIN {ServerName} {AccountName} {Password}.
  128. -----------------------------------------------------------------------------
  129.   Procedure NetLogout(Server  : String;
  130.                   Var Error   : Integer);
  131.  
  132.    * Server = Name of server to log out of (ie. "\\SERVER")
  133.      Error  = Error number or 0 if no error
  134.  
  135.      Log out of a server. Does the same thing as
  136.      NET LOGOUT {ServerName}.
  137. -----------------------------------------------------------------------------
  138.   Procedure GetUser(  Index   : Integer;
  139.                   Var Name    : String;
  140.                   Var Error   : String);
  141.  
  142.    * Index  = Login entry index. Index 0 specifies first entry.
  143.      Name   = Name of user logged in
  144.      Error  = Error number or 0 if no error
  145.  
  146.      Get name of user logged into server.
  147. -----------------------------------------------------------------------------
  148.   Procedure GetServer(Index   : Integer;
  149.                   Var Name    : String;
  150.                   Var Error   : Integer);
  151.  
  152.    * Index  = Available server index. Index 0 specifies first entry.
  153.      Name   = Name of server. Does not include the \\ prefix.
  154.      Error  = Error number or 0 if no error
  155.  
  156.      Get name of server that is available but not currently logged in.
  157. -----------------------------------------------------------------------------
  158.  
  159. ERROR CODES
  160.  
  161.      {Node Name} is replaced with the name of the node. RESERVED errors are
  162.   returned as "General Failure".
  163.  
  164. Error Number      Meaning
  165. ------------      -------
  166.   1    01H     Invalid function number
  167.   2    02H     File not found
  168.   3    03H     Path not found
  169.   4    04H     File open limit has been exceeded or no handles left
  170.   5    05H     Access denied
  171.   6    06H     Invalid handle
  172.   7    07H     Memory control blocks destroyed
  173.   8    08H     The memory limit has been exceeded
  174.   9    09H     Invalid memory block address
  175.  10    0AH     Invalid environment
  176.  11    0BH     Invalid format
  177.  12    0CH     Invalid access code
  178.  13    0DH     Invalid data
  179.  14    0EH     RESERVED
  180.  15    0FH     Invalid drive was specified
  181.  16    10H     Attempt to remove current directory
  182.  17    11H     Not same device
  183.  18    12H     No more files
  184.  19    13H     Attempt to write on write protected disk
  185.  20    14H     Unknown unit
  186.  21    15H     Drive not ready
  187.  22    16H     Unknown command
  188.  23    17H     Data CRC error
  189.  24    18H     Bad req stuc length
  190.  25    19H     Seek error
  191.  26    1AH     Unknown media
  192.  27    1BH     Sector not found
  193.  28    1CH     No paper
  194.  29    1DH     Write fault
  195.  30    1EH     Read fault
  196.  31    1FH     General failure
  197.  32    20H     Sharing violation
  198.  33    21H     Lock violation
  199.  34    22H     Invalid disk change
  200.  35    23H     FCB unavailable
  201.  36    24H     Sharing buffer overflow
  202.  37    25H     RESERVED
  203.  38    26H     Cannot complete file operation
  204.  39-49 27